From 79eae2548ba9e6a250baf15b379fb9cb252d90f2 Mon Sep 17 00:00:00 2001 From: "Liu, Jinsong" Date: Fri, 11 Mar 2011 16:27:33 +0000 Subject: [PATCH] x86: Fix cpu offline bug: cancel SYSIO method when play dead Play dead is a fragile and tricky point of cpu offline logic. For how to play cpu dead, linux kernel changed several times: Very old kernel support 3 ways to play cpu dead: mwait, SYSIO, and halt, just like what cpuidle did when enter C3; Later, it cancel mwait and SYSIO support, only use halt to play dead; Latest linux 2.6.38 add mwait support when cpu dead. This patch cancel SYSIO method when cpu dead, keep same with latest kernel. SYSIO is an obsoleted method to enter deep C, with some tricky hardware behavior, and seldom supported in new platform. Xen experiment indicate that when cpu dead, SYSIO method would trigger unknown issue which would bring strange error. We now cancel SYSIO method when cpu dead, after all, correctness is more important than power save, and btw new platform use mwait. Signed-off-by: Liu, Jinsong --- xen/arch/x86/acpi/cpu_idle.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/xen/arch/x86/acpi/cpu_idle.c b/xen/arch/x86/acpi/cpu_idle.c index 7cbcceeb7a..a01a27f4ad 100644 --- a/xen/arch/x86/acpi/cpu_idle.c +++ b/xen/arch/x86/acpi/cpu_idle.c @@ -554,7 +554,6 @@ static void acpi_dead_idle(void) { struct acpi_processor_power *power; struct acpi_processor_cx *cx; - int unused; if ( (power = processor_powers[smp_processor_id()]) == NULL ) goto default_halt; @@ -574,10 +573,6 @@ static void acpi_dead_idle(void) __monitor((void *)&mwait_wakeup(smp_processor_id()), 0, 0); __mwait(cx->address, 0); break; - case ACPI_CSTATE_EM_SYSIO: - inb(cx->address); - unused = inl(pmtmr_ioport); - break; default: goto default_halt; } -- 2.30.2